<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src="js/react.js"></script>
    <script src="js/react-dom.js"></script>
    <script src="js/browser.min.js"></script>
</head>
<body>
    <div id='example'></div>
    
    <script type='text/babel'>
        // 创建组件
        var MyComponent = React.createClass({
            render:function(){
                return <div>
                    {/*这是一个注释*/}
                    <h2> it is a component</h2> 
                    <p>test</p>
                </div>
            } 
        });

        ReactDOM.render(
            <div>
                <MyComponent></MyComponent>
                <h1> hello world </h1>
            </div>,
            document.getElementById('example')
        );
    </script>
</body>
</html>